<?php echo $this->Html->script(array('users.view','actions'),$options = array('allowCache'=>false,'safe'=>false,'inline'=>false));?>
<?php echo $this->Html->css(array('events.add','form','actions'),null,array('inline'=>false));?>


<?php $this->Html->addCrumb(__('Events',true),array('controller'=>'events','action'=>'index'))?>
<?php $this->Html->addCrumb(__('Add',true),array('controller'=>'events','action'=>'add'))?>

<div id="crumbs">
	<?php echo $this->Html->getCrumbs(Configure::read('Config.crumbs'),__('Home',true))?>
</div>

<div class="content">
	<div class="left-column main-column">

		<div class="box corners events form">
		<?php echo $this->Form->create('Event');?>
			<h2><?php __('Add Event'); ?></h2>
			<?php
				echo $this->Form->hidden('user_id',array('value'=>$user_id));
				echo $this->Form->input('name');
				echo $this->Form->input('small_content');
				echo $this->Form->input('content');
				echo $this->Form->input('date_from');
				echo $this->Form->input('date_to');
			?>
			
			<h2><?php echo __('Associate an event with the charter boat',true)?></h2>
			<?php 
				if(isset($yachtCharters))
				echo $this->Form->input('yacht_charters_id',array('type'=>'radio'));
// 				echo $this->Form->input('status');
// 				echo $this->Form->input('user_id');
			?>
		<?php echo $this->Form->end(__('Submit', true));?>
		
		</div>	
	
	
	</div>
	
	<div class="right-column">
		<?php echo $this->element('user_main_left_menu')?>		
	</div>
</div>
<div class="clear">&nbsp;</div>
<?php if($session->check('Auth.User.id') && $this->Session->read('Auth.User.group') == 'admin' || $session->check('Auth.User.id') && $this->Session->read('Auth.User.group') == 'manag'){?>
<div class="actions main_actions">
	<h3><?php __('Actions'); ?></h3>
	<ul>

		<li><?php echo $this->Html->link(__('List Events', true), array('action' => 'index'));?></li>
		<li><?php echo $this->Html->link(__('List Yacht Charters', true), array('controller' => 'yacht_charters', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Yacht Charters', true), array('controller' => 'yacht_charters', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Users', true), array('controller' => 'users', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New User', true), array('controller' => 'users', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Posts', true), array('controller' => 'posts', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Post', true), array('controller' => 'posts', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Uploads', true), array('controller' => 'uploads', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Upload', true), array('controller' => 'uploads', 'action' => 'add')); ?> </li>
	</ul>
</div>

<?php }?>